package com.sky.common.annotation;

import com.sky.common.validator.DateTimeStrValidator;
import jakarta.validation.Constraint;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = DateTimeStrValidator.class)
public @interface DateTimeStr {
    String message() default "format incorrect";

    String format() default "yyyy-MM-dd HH:mm:ss";

}
